﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace _0712502_0712504_DesignPatternGame
{
    public class AutomatedTank4Builder : TankBuilder
    {
        private AutomatedTank4 _product = new AutomatedTank4();
        public override void BuildBody(TankBodyFactory tankBodyFactory)
        {         
            _product.AddBody((TankBodyModel)tankBodyFactory.CreateObject(6));
        }

        public override void BuildTurret(TankTurretFactory tankTurretFactory)
        {
            _product.AddTurret((TankTurretModel)tankTurretFactory.CreateObject(6));
        }

        public override void BuildEngine()
        {
            ChinaEngine engine = new ChinaEngine();
            this._product.AddEngine(engine);
        }

        public override TankPrototype GetResult()
        {
            _product.StateUsed = StateInUse.Using;         
            return _product;
        }
    }
}
